#include <stdio.h>

void reverseString(char* s) {
    int len = 0;
    while (s[len] != '\0') {
        len++;
    }

    int start = 0;
    int end = len - 1;
    while (start < end) {
        char temp = s[start];
        s[start] = s[end];
        s[end] = temp;
        start++;
        end--;
    }
}

int main() {
    char s[128];
    printf("请输入一个字符串：");
    scanf("%s", s);

    reverseString(s);

    printf("翻转后的字符串为：%s\n", s);

    return 0;
}
